#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <functional>
#include <set>
using namespace std;


class Solution {
public:
    char firstUniqChar(string s) {
        map<char ,int > map_s;
        int n = s.size();
        if(n==0) return ' ';
        for (int i = 0; i < n; ++i) {
            auto ret = map_s.insert(pair<char,int>(s[i],1));
            if(!ret.second){
                map_s[s[i]] +=1;
            }

        }
        for (int j = 0; j < n; ++j) {
            if(map_s[s[j]]==1){
                return s[j];
            }
        }
        return ' ';
    }
};

int main(){
    Solution a;
    cout<<a.firstUniqChar("12258");
}